import { nextTick } from 'vue'
/**
 * @description: 全局指令：输入框、文本域自动获取焦点
 * @return {*}
 */
export default {
    name: 'focus',
    updated(el) {
        nextTick(() => {
            el.querySelector('input') && el.querySelector('input').focus()
            el.querySelector('textarea') && el.querySelector('textarea').focus()
        })
    }
}